/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.emergency.drill.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.hopes.bizz.emergency.common.constant.enums.ParkEmergencySysDictEnum;
import com.hopes.boss.admin.api.resolver.DictResolver;
import com.hopes.boss.common.entity.BaseLogicEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 园区应急演练
 *
 * @author cx
 * @date 2024-01-16 14:37:01
 */
@Data
@TableName("er_park_drill")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "园区应急演练")
public class ErParkDrillEntity extends BaseLogicEntity {

    private static final long serialVersionUID = 1L;


	/**
	* 标识
	*/
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description="标识")
    private Long id;

	/**
	* 演练名称
	*/
    @Schema(description="演练名称")
    private String drillName;

	/**
	* 演练类型
	*/
    @Schema(description="演练类型")
    private Integer drillType;

	/**
	* 演练方式
	*/
    @Schema(description="演练方式")
    private Integer drillMethod;

	/**
	* 演练地点
	*/
    @Schema(description="演练地点")
    private String drillAddress;

	/**
	* 演练科目
	*/
    @Schema(description="演练科目")
    private Integer drillSubjectType;

	/**
	* 演练开始时间
	*/
    @Schema(description="演练开始时间")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date drillBeginTime;

	/**
	* 演练结束时间
	*/
    @Schema(description="演练结束时间")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date drillEndTime;

	/**
	* 演练负责人
	*/
    @Schema(description="演练负责人")
    private String drillChargePerson;

	/**
	* 负责人电话
	*/
    @Schema(description="负责人电话")
    private String chargePersonPhone;

	/**
	* 演练人数
	*/
    @Schema(description="演练人数")
    private Integer drillPersons;

	/**
	* 描述
	*/
    @Schema(description="描述")
    private String remarks;

	/**
	* 演练方案文件
	*/
    @Schema(description="演练方案文件")
    private String drillFile;

	/**
	* 演练脚本文件
	*/
    @Schema(description="演练脚本文件")
    private String drillFileScript;

	/**
	* 演练评估文件
	*/
    @Schema(description="演练评估文件")
    private String drillFileAssess;

	/**
	* 演练照片文件
	*/
    @Schema(description="演练照片文件")
    private String drillFileImg;

	/**
	* 状态
	*/
    @Schema(description="状态")
    private Integer status;

	/**
	* 机构ID
	*/
    @Schema(description="机构ID")
    private Long orgId;

	public String getDrillTypeStr(){
		return DictResolver.getItemLabelByValue(ParkEmergencySysDictEnum.emergency_plan_drill_type, this.getDrillType());
	}
	public String getDrillMethodStr(){
		return DictResolver.getItemLabelByValue(ParkEmergencySysDictEnum.emergency_plan_drill_method, this.getDrillMethod());
	}
	public String getDrillSubjectTypeStr(){
		return DictResolver.getItemLabelByValue(ParkEmergencySysDictEnum.emergency_good_handling_accidents, this.getDrillSubjectType());
	}

}